import request from '@/utils/request'

// 查询待评价人员列表
export function listMember(query) {
  return request({
    url: '/evaluation/member/list',
    method: 'get',
    params: query
  })
}

// 查询评价项目
export function getEvaluationItems(query) {
  return request({
    url: '/evaluation/member/getEvaluationItems',
    method: 'get',
    params: query
  })
}
// 查询待评价人员详细
export function getMember(id) {
  return request({
    url: '/evaluation/member/' + id,
    method: 'get'
  })
}

// 新增待评价人员
export function addMember(data) {
  return request({
    url: '/evaluation/member',
    method: 'post',
    data: data
  })
}

// 修改待评价人员
export function updateMember(data) {
  return request({
    url: '/evaluation/member',
    method: 'put',
    data: data
  })
}

// 更新综合评价结果
export function updateComEvaluation(memberId, score, content){
  return request({
    url: '/evaluation/member/updateComEvaluation/' + memberId,
    method: 'get',
    params: {
      score: score,
      content: content
    }
  })
}

// 评价总览
export function overview(id){
  return request({
    url: '/evaluation/member/overview/' + id,
    method: 'get'
  })
}

// 删除待评价人员
export function delMember(id) {
  return request({
    url: '/evaluation/member/' + id,
    method: 'delete'
  })
}
